﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BaoJian
{
    [Serializable]
    class Product
    {
        private string productID;
        private string productName;
        private int number;
        private decimal price;
        private DateTime dateAdded;

        /// <summary>
        /// 选购产品的构造函数
        /// </summary>
        /// <param name="PID">产品ID</param>
        /// <param name="PName">产品名称</param>
        /// <param name="SelectNumber">购买数量</param>
        /// <param name="PPrice">产品价格</param>
        /// <param name="ItemAddDate">添加日期</param>
        public Product(string PID,string PName,int SelectNumber,decimal PPrice,DateTime ItemAddDate) 
        {
            ProductID = PID;
            ProductName = PName;
            Number = SelectNumber;
            Price = PPrice;
            DateAdded = ItemAddDate;
        }

        public string ProductID
        {
            get { return productID; }
            set { productID = value; }
        }

        public string ProductName
        {
            get { return productName; }
            set { productName = value; }
        }

        public int Number
        {
            get { return number; }
            set { number = value; }
        }

        public decimal Price
        {
            get { return price; }
            set { price = value; }
        }

        public DateTime DateAdded
        {
            get { return dateAdded; }
            set { dateAdded = value; }
        }
    }
}
